/*
 * @Author: caijw 
 * @Date: 2018-11-11 13:14:20 
 * @Last Modified by: caijw
 * @Last Modified time: 2018-12-01 22:12:25
 * 
 * 积分充值
 */

import React, { Component } from 'react';
import Header from '../../../../components/Header/Header';
import { Toast } from 'react-weui';
import { connect } from "react-redux";
import * as actions from '../../../../store/action/my';
import '../../../../static/css/common.less';
import './rechargeRecord.less';
class RechargeRecord extends Component {

    componentWillMount(){
        this.props.getCardNumberList();
    }

    componentWillReceiveProps(){
        
    }
    render() {
        return (
            <div>
                <div className="detail-region">
                    <Toast icon="loading" show={this.props.my.fetching}>Loading...</Toast>
                    <Header title="充值记录"></Header>
                    <section class="content content-record">
                    {this.props.my.cardList.list.map((item)=>{
                        return  <div className="record-item">
                                    <div className="card-id">充值卡号:{item.couponcardno}</div>
                                    <div className="card-date">{item.created_at}</div>
                                    <div className="card-num">+{item.score}</div>
                            </div>
                    })}
                    </section>
                </div>
            </div>
        )
    }
}

export default connect((state)=>{return {...state}}, actions)(RechargeRecord);